#include<stdio.h>
#include<pthread.h>
void * pthread1(void *arg)
{
	pthread_detach(pthread_self());
	int count=5000;
	while(count-->0){
		printf("hello\n");
		sleep(1);
	}
	printf("hello\n");
}
int main()
{
	pthread_t thread1=0;
	int ret=pthread_create(&thread1,NULL,pthread1,NULL);
	int count=5;
	while(count-->0){
		printf("main hello\n");
		sleep(1);
	}
	void *thread_id=0;	
	ret=pthread_join(thread1,&thread_id);
	printf("%d\n",thread_id);
	printf("11111\n");
	sleep(1);
	return 0;
}
